home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 April: Mac OS SDK / Dev.CD Apr 96 SDK / Dev.CD Apr 96 SDK1.toast / Development Kits (Disc 1) / OpenDoc Development Framework / ODFDev / ODF / OS / FWGraphx / Include / FWPicShp.h < prev    next >
Encoding:
Text File  |  1995-11-08  |  2.8 KB  |  108 lines  |  [TEXT/MPS ]

  1. //========================================================================================
  2. //
  3. //    File:                FWPicShp.h
  4. //    Release Version:    $ 1.0d11 $
  5. //
  6. //    Copyright:    © 1995 by Apple Computer, Inc., all rights reserved.
  7. //
  8. //========================================================================================
  9.  
  10. #ifndef FWPICSHP_H
  11. #define FWPICSHP_H
  12.  
  13. #ifndef FWSHAPE_H
  14. #include "FWShape.h"
  15. #endif
  16.  
  17. #ifndef FWBNDSHP_H
  18. #include "FWBndShp.h"
  19. #endif
  20.  
  21. #ifndef FWPICTUR_H
  22. #include "FWPictur.h"
  23. #endif
  24.  
  25. #if FW_LIB_EXPORT_PRAGMAS
  26. #pragma lib_export on
  27. #endif
  28.  
  29. //========================================================================================
  30. //    Forward Declarations
  31. //========================================================================================
  32.  
  33. class FW_CLASS_ATTR FW_CGraphicContext;
  34. class FW_CLASS_ATTR FW_CBitmapShape;
  35.  
  36. //========================================================================================
  37. //    class FW_CPictureShape
  38. //========================================================================================
  39.  
  40. class FW_CLASS_ATTR FW_CPictureShape : public FW_CBoundedShape
  41. {
  42. public:
  43.     FW_DECLARE_CLASS
  44.  
  45. //----------------------------------------------------------------------------------------
  46. //    Constructors/Destructors
  47. //
  48. public:
  49.     FW_CPictureShape(FW_PPicture picture, const FW_CRect& dstRect);
  50.  
  51.     FW_CPictureShape(const FW_CPictureShape& other);
  52.     FW_CPictureShape(FW_CReadableStream& archive);
  53.  
  54.     virtual ~ FW_CPictureShape();
  55.     
  56. //----------------------------------------------------------------------------------------
  57. //    Operators
  58. //
  59. public:
  60.     FW_CPictureShape& operator=(const FW_CPictureShape& other);
  61.     
  62. //---------------------------------------------------------------------------------------
  63. //    Inherited API
  64. //
  65. public:
  66.     // ----- Rendering -----
  67.     virtual void                 Render(FW_CGraphicContext& gc) const;
  68.     
  69.     // ----- Flatten -----
  70.     virtual void                Flatten(FW_CWritableStream& archive) const;
  71.  
  72. //---------------------------------------------------------------------------------------
  73. //    New API
  74. //
  75. public:
  76.     // ----- Rendering -----
  77.     static void                RenderPicture(FW_CGraphicContext& gc,
  78.                                             FW_PPicture picture,
  79.                                             const FW_CRect& dstRect);
  80.     
  81.     // ----- Copying -----
  82.     virtual FW_CShape*            Copy() const;
  83.     
  84.     // ----- Archiving -----
  85.     static void*                 Read(FW_CReadableStream& archive);
  86.  
  87.     // ----- Geometry -----
  88.     void                        SetGeometry(const FW_PPicture& picture, const FW_CRect& dstRect);
  89.     void                         GetGeometry(FW_PPicture& picture, FW_CRect& dstRect) const;
  90.  
  91.     FW_PPicture                    GetPicture() const
  92.                                     {return fPicture;}
  93.     void                        SetPicture(const FW_PPicture& picture)
  94.                                     {fPicture = picture;}
  95.     
  96. //---------------------------------------------------------------------------------------
  97. //    Data Member
  98. //    
  99. private:
  100.     FW_PPicture     fPicture;
  101. };
  102.             
  103. #if FW_LIB_EXPORT_PRAGMAS
  104. #pragma lib_export off
  105. #endif
  106.     
  107. #endif
  108.